﻿@using JabbR;

    <form class="form-horizontal" action="@Url.Content("~/account/login" + Html.RequestQuery())" method="post">
        @Html.ValidationSummary()
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="icon-user"></i></span>
                    @Html.TextBox("username", "span10", @LanguageResources.Account_UserName)
                </div>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <div class="input-prepend">
                    <span class="add-on"><i class="icon-lock"></i></span>
                    @Html.Password("password", "span10", @LanguageResources.Account_Pass)
                </div>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <button type="submit" class="btn">@LanguageResources.Account_SignIn</button>
            </div>
        </div>
        @if (Model.AllowUserRegistration || Model.AllowUserResetPassword)
        { 
            <div class="control-group">
                <div class="controls">                    
                    @if (Model.AllowUserRegistration)
                    {
                        <p>
                            @Html.Raw(String.Format(LanguageResources.Account_RegisterMessage, Url.Content("~/account/register" + Html.RequestQuery())))
                        </p>
                    }
                    @if (Model.AllowUserResetPassword && Model.HasEmailSender)
                    { 
                        <p>
                            @Html.Raw(String.Format(LanguageResources.Account_ResetPasswordMessage, Url.Content("~/account/requestresetpassword"  + Html.RequestQuery())))      
                        </p>   
                    }
                </div>
            </div>
        }
        @Html.AntiForgeryToken()
    </form>
